import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory, IndexRedirect } from 'react-router';
import App from './components/Main';
import Home from './components/Home/Home';
import Products from './components/Products/Products';
import Team from './components/Team/Team';
import Apply from './components/Apply/Apply';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();

import 'amazeui-touch/dist/amazeui.touch.min.css';

// Render the main component into the dom
//ReactDOM.render(<App />, document.getElementById('app'));

ReactDOM.render((
    <Router history={hashHistory} onUpdate={() => window.scrollTo(0, 0)}>
        <Route path="/" component={App}>
            <IndexRedirect to="/home"/>
            <Route path="/products" component={Products}/>
            <Route path="/team" component={Team}/>
            <Route path="/home" component={Home}/>
            <Route path="/apply" component={Apply}/>
        </Route>
    </Router>
),document.getElementById('app'));
